﻿using AutoMapper;
using J.Model;
using J.ProductSet.Application.Command.AggregateCommodityCommand;
using J.ProductSet.Application.Command.ClassifiedManagementCommand;
using J.ProductSet.Application.Command.CommercialOwnerCommand;
using J.ProductSet.Application.Command.PriceInventoryControlCommand;
using J.ProductSet.Application.Command.ProductCommand;
using J.ProductSet.Application.Command.ProductLabelCommand;
using J.ProductSet.Application.Command.ProductSetupCommand;
using J.ProductSet.Application.Command.ReleaseAppointmentCommand;
using J.ProductSet.Application.Command.ReservationinformationtableCommand;

namespace J.ProductSet.Extensions
{
    public class Productfile: Profile
    {
        public Productfile()
        {
            //聚合商品添加
            CreateMap<AggregatePostCommand, AggregateCommodity>().ReverseMap();
            //聚合商品删除
            CreateMap<AggregateUpdateCommand, AggregateCommodity>().ReverseMap();
            //分类管理表添加
            CreateMap<ClassifiedManagementPostCommand, ClassifiedManagement>().ReverseMap();
            //分类管理表修改
            CreateMap<ClassifiedManagementUpdateCommand, ClassifiedManagement>().ReverseMap();
            //商户设置表添加
            CreateMap<CommercialOwnerPostCommand, CommercialOwner>().ReverseMap();
            //商户设置表修改
            CreateMap<CommercialOwnerUpdateCommand, CommercialOwner>().ReverseMap();
            //价格库存管理添加
            CreateMap<PriceInventoryControlPostCommand, PriceInventoryControl>().ReverseMap();
            //价格库存管理修改
            CreateMap<PriceInventoryControlUpdateCommand, PriceInventoryControl>().ReverseMap();
            //商品添加
            CreateMap<ProductPostCommand, Product>().ReverseMap();
            //商品修改
            CreateMap<ProductUpdateCommand, Product>().ReverseMap();
            //商品标签表添加
            CreateMap<ProductLabelPOSTCommand, ProductLabel>().ReverseMap();
            //商品标签表修改
            CreateMap<ProductLabelUpdateCommand, ProductLabel>().ReverseMap();
            //发布预约添加
            CreateMap<ReleaseAppointmentPostCommand, ReleaseAppointment>().ReverseMap();
            //发布预约修改
            CreateMap<ReleaseAppointmentUpdateCommand, ReleaseAppointment>().ReverseMap();
            //预留信息表添加
            CreateMap<RESERVATIONINFORMATIONTABLEPOSTCommand, RESERVATIONINFORMATIONTABLE>().ReverseMap();
            //预留信息表修改
            CreateMap<RESERVATIONINFORMATIONTABLEUpdateCommand, RESERVATIONINFORMATIONTABLE>().ReverseMap();
            //商品设置添加
            CreateMap<ProductSetupPostCommand, ProductSetup>().ReverseMap();  
        }
    }
}
